In [1]:
nbr = 32

PrintMode =  ([ 4,  'DROPMULT', 'Dropmultiplication'],)
PrintMode += ([ 8,  'START_ABS', 'Start absolut'],)
PrintMode += ([ 9,  'START_REL', 'Start relative'],)
PrintMode += ([10,  'IMG_OFS',   'Image offset'],)
PrintMode += ([11,  'IMG_SHIFT', 'Image shift'],)
PrintMode += ([12,  'IMG_ROT', 'Image Rotation'],)
PrintMode += ([13,  'IMG_MAP', 'Image Mapping'],)
PrintMode += ([16,  'FLIP_X', 'Activate Flip-X'],)
PrintMode += ([17,  'FLIP_Y', 'Activate Flip-Y'],)
PrintMode += ([18,  'MASKING', 'Activate masking'],)
PrintMode += ([24,  'EMULENC', 'Emulate encoder'],)
PrintMode += ([25,  'HWENC', 'Use hardware encoder'],)
PrintMode += ([26,  'REV_HWENC', 'Reverse hardware encoder'],)
PrintMode += ([27,  'SP_HWENC', 'Encoder in single phase mode'],)
PrintMode += ([28,  'RS422_OPT', 'Encoder RS422 output option [1:0]'],)
PrintMode += ([29,  ':::', ':::'],)
PrintMode += ([31, 'LAST',        '-'],)


print("| bit ^                           Binary ^ Hex      ^   Decimal  ^    ^ Register name   ^ Comment ^")
print("|-----|----------------------------------|----------|------------|----|-----------------|-----------------------------------|")
for i in range(nbr):
  desc = [0, '', '']
  for k in PrintMode:
    if k[0] == i:
      desc = k
  print("|{0:4} | {1:032b} | {1:08X} | {1:10d} | {0:2} | {2:15} | {3:33} |".format(i,1<<i,desc[1],desc[2]))


| bit ^                           Binary ^ Hex      ^   Decimal  ^    ^ Register name   ^ Comment ^
|-----|----------------------------------|----------|------------|----|-----------------|-----------------------------------|
|   0 | 00000000000000000000000000000001 | 00000001 |          1 |  0 |                 |                                   |
|   1 | 00000000000000000000000000000010 | 00000002 |          2 |  1 |                 |                                   |
|   2 | 00000000000000000000000000000100 | 00000004 |          4 |  2 |                 |                                   |
|   3 | 00000000000000000000000000001000 | 00000008 |          8 |  3 |                 |                                   |
|   4 | 00000000000000000000000000010000 | 00000010 |         16 |  4 | DROPMULT        | Dropmultiplication                |
|   5 | 00000000000000000000000000100000 | 00000020 |         32 |  5 |                 |                                   |
|   6 | 00000000000000000000000001000000 | 00000040 |         64 |  6 |                 |                                   |
|   7 | 00000000000000000000000010000000 | 00000080 |        128 |  7 |                 |                                   |
|   8 | 00000000000000000000000100000000 | 00000100 |        256 |  8 | START_ABS       | Start absolut                     |
|   9 | 00000000000000000000001000000000 | 00000200 |        512 |  9 | START_REL       | Start relative                    |
|  10 | 00000000000000000000010000000000 | 00000400 |       1024 | 10 | IMG_OFS         | Image offset                      |
|  11 | 00000000000000000000100000000000 | 00000800 |       2048 | 11 | IMG_SHIFT       | Image shift                       |
|  12 | 00000000000000000001000000000000 | 00001000 |       4096 | 12 | IMG_ROT         | Image Rotation                    |
|  13 | 00000000000000000010000000000000 | 00002000 |       8192 | 13 | IMG_MAP         | Image Mapping                     |
|  14 | 00000000000000000100000000000000 | 00004000 |      16384 | 14 |                 |                                   |
|  15 | 00000000000000001000000000000000 | 00008000 |      32768 | 15 |                 |                                   |
|  16 | 00000000000000010000000000000000 | 00010000 |      65536 | 16 | FLIP_X          | Activate Flip-X                   |
|  17 | 00000000000000100000000000000000 | 00020000 |     131072 | 17 | FLIP_Y          | Activate Flip-Y                   |
|  18 | 00000000000001000000000000000000 | 00040000 |     262144 | 18 | MASKING         | Activate masking                  |
|  19 | 00000000000010000000000000000000 | 00080000 |     524288 | 19 |                 |                                   |
|  20 | 00000000000100000000000000000000 | 00100000 |    1048576 | 20 |                 |                                   |
|  21 | 00000000001000000000000000000000 | 00200000 |    2097152 | 21 |                 |                                   |
|  22 | 00000000010000000000000000000000 | 00400000 |    4194304 | 22 |                 |                                   |
|  23 | 00000000100000000000000000000000 | 00800000 |    8388608 | 23 |                 |                                   |
|  24 | 00000001000000000000000000000000 | 01000000 |   16777216 | 24 | EMULENC         | Emulate encoder                   |
|  25 | 00000010000000000000000000000000 | 02000000 |   33554432 | 25 | HWENC           | Use hardware encoder              |
|  26 | 00000100000000000000000000000000 | 04000000 |   67108864 | 26 | REV_HWENC       | Reverse hardware encoder          |
|  27 | 00001000000000000000000000000000 | 08000000 |  134217728 | 27 | SP_HWENC        | Encoder in single phase mode      |
|  28 | 00010000000000000000000000000000 | 10000000 |  268435456 | 28 | RS422_OPT       | Encoder RS422 output option [1:0] |
|  29 | 00100000000000000000000000000000 | 20000000 |  536870912 | 29 | :::             | :::                               |
|  30 | 01000000000000000000000000000000 | 40000000 | 1073741824 | 30 |                 |                                   |
|  31 | 10000000000000000000000000000000 | 80000000 | 2147483648 | 31 | LAST            | -                                 |